package com.qf.pojo;

/**
 * @author 高圆圆
 * @date 2023/1/4 17:27
 * 购物车项实体
 */
public class CartItem {
    private  Product product  ; //包含商品实体
    private int count ; //商品数量
    private double subTotal ; //小计金额

    public CartItem() {
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    //直接计算
    public double getSubTotal() {
        return product.getShop_price()*count;
    }

   /* public void setSubTotal(double subTotal) {
        this.subTotal = subTotal;
    }*/

}
